package com.hhkj.payment.wechat.notification.domain;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * NotificationHandLog
 *
 * @author HHKJ-SERVER-ZJ
 * @since 2023/11/24 9:23
 */
@Data
@TableName(value = "wechat_pay_notification_hand_log")
@AllArgsConstructor
@NoArgsConstructor
public class NotificationHandLog implements Serializable {

    /** 数据id */
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 事件编码 */
    private String eventType;

    /** 通知信息体 */
    private String notificationBody;

    /** 解密后的实体信息 */
    private String decryptObjBody;

    /** 处理标签 1-是 0-否 */
    private Integer handedFlag;

    /** 创建时间 */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    public NotificationHandLog(String eventType, String notificationBody, Integer handedFlag, String decryptObjBody) {
        this.eventType = eventType;
        this.notificationBody = notificationBody;
        this.handedFlag = handedFlag;
        this.decryptObjBody = decryptObjBody;
    }

    public NotificationHandLog(String eventType, String notificationBody, Integer handedFlag) {
        this.eventType = eventType;
        this.notificationBody = notificationBody;
        this.handedFlag = handedFlag;
    }
}
